﻿<Page
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:magellan="http://xamlforge.com/magellan" 
    xmlns:iPhone_Controls="clr-namespace:iPhone.Controls" 
    x:Class="iPhone.Applications.Phone.Views.GroupsView" 
    Title="GroupsView"
    d:DesignWidth="262.373" d:DesignHeight="370"
    Style="{DynamicResource Page.LightStyle}"
    >
    <DockPanel>
    	<iPhone_Controls:PageTitle DockPanel.Dock="Top" Title="Groups"/>
        <ItemsControl ItemsSource="{Binding Groups}" Margin="5">
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Name}" Margin="3" Background="Transparent" Cursor="Hand" >
                    	<i:Interaction.Triggers>
                            <i:EventTrigger EventName="MouseDown">
                                <magellan:NavigateWithTransitionAction Action="Group" Controller="Phone" Transition="Forward">
                                    <magellan:NavigateWithTransitionAction.Parameters>
                    				    <magellan:Parameter ParameterName="group" Value="{Binding}"/>
                    			    </magellan:NavigateWithTransitionAction.Parameters>
                                </magellan:NavigateWithTransitionAction>
                            </i:EventTrigger>
                        </i:Interaction.Triggers>
                    </TextBlock>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
    </DockPanel>
</Page>
